package com.crr.mq;

import org.springframework.amqp.core.AbstractExchange;

import java.util.HashMap;
import java.util.Map;

public class LazyExchange extends AbstractExchange {
    private final String type="x-delayed-message";//交换器类型
    static Map<String ,Object> argsMap;
    static {
        argsMap=new HashMap<>();
        argsMap.put("x-delayed-type","direct");//使用的路由键
    }
    public LazyExchange(String name){
        super(name,true,false,argsMap);
    }
    @Override
    public String getType() {
        return this.type;
    }
}